Welcome![Sign In][Sign Up]
Location:
Search - encoding using Huffman code

Search list

[Technology Managementwindlx

Description: 经统计,某机器14条指令的使用频度分别为:0.01,0.15,0.12,0.03,0.02,0.04,0.02,0.04,0.01,0.13,0.15,0.14,0.11,0.03。分别求出用等长码、Huffman码、只有两种码长的扩展操作码3种编码方式的操作码平均码长。 解: 等长操作码的平均码长=4位 Huffman编码的平均码长=3.38位 只有两种码长的扩展操作码的平均码长=3.4位。 9.若某机要求:三地址指令4条,单地址指令255条,零地址指令16条。设指令字长为12位.每个 地址码长为3位。问能否以扩展操作码为其编码?如果其中单地址指令为254条呢?说明其理由。 答:①不能用扩展码为其编码。 ∵指令字长12位,每个地址码占3位; ∴三地址指令最多是2^(12-3-3-3)=8条, 现三地址指令需4条, ∴可有4条编码作为扩展码, ∴单地址指令最多为4×2^3×2^3=2^8=256条, 现要求单地址指令255条,∴可有一条编码作扩展码 ∴零地址指令最多为1×2^3=8条 不满足题目要求 ∴不可能以扩展码为其编码。 ②若单地址指令254条,可以用扩展码为其编码。 ∵依据①中推导,单地址指令中可用2条编码作为扩展码 ∴零地址指令为2×2^3=16条,满足题目要求-By the statistics, a machine 14 commands the use of frequency were: 0.01,0.15,0.12,0.03,0.02,0.04,0.02,0.04,0.01,0.13,0.15,0.14,0.11,0.03. Were obtained using such a long code, Huffman code, there are only two yards of the three kinds of expansion opcode opcode encoding of the average code length
Platform: | Size: 144384 | Author: lily | Hits:

[Compress-Decompress algrithmshuffmancoding

Description: 对文本文件success.dat进行霍夫曼编码,用文本文件coding.dat保存编码-Success.dat of text files to Huffman code, using a text file save encoding coding.dat
Platform: | Size: 12288 | Author: greengrape | Hits:

[Data structshuffman

Description: Huffman编码是最优变长码,请设计一个Huffma编码程序,实现以下功能: (1)接收原始数据:从终端读入字符集大小n,以及n个字符和权值,建立Huffman 树,并将它文件hfmtree.dat中。 (2)编码:利用已建立的哈夫曼树,对文件中的正文进行编码,将结果存入文件codefile.dat中。 (3)译码:利用已建立号的哈夫曼树将sodefile.dat中的代码进行译码,结果存入文件textfile.dat中。 (4)打印编码规:即字符与编码之间的一一对应关系。 (5)打印Huffman树,将已存入内存中的哈夫曼树以直观的方式显示在终端上。-Huffman coding is optimal variable-length code, the design of a Huffma coding process, realize the following functions: (1) to receive the raw data: Reading from the terminal into the character set size n, and n characters, and the right values, the establishment of Huffman tree, and It documents in hfmtree.dat. (2) Coding: Using the Huffman tree has been established to document the body encode the results into a document in codefile.dat. (3) Decoding: The number has been established Huffman tree will sodefile.dat decoding of code, resulting in a document deposited in textfile.dat. (4) Print coding rules: that is, characters with one-to-one relationship between the encoding. (5) Print Huffman tree will have been deposited in the Huffman tree in memory intuitive way to show that in the terminal.
Platform: | Size: 4096 | Author: gaocong | Hits:

[Data structshuffman

Description: 输入一段英文字符,试为该文中的每个字符编制相应的哈夫曼码。 (1)I:初始化(Initialization)。对输入的一段英文中的每个字符统计其权值,建立哈夫曼树; (2)E:编码(Encoding)。利用已建好的哈夫曼树,对每个字符进行编码。 (3)D:译码(Decoding)。利用已建好的每个编码,对输入的一个由0、1组成的序列进行译码; (4)P:印代码文件(Print)。将每个字符编的哈夫曼码和译码结果显示在终端上。 -Enter a period of English characters, try the text for each character corresponding Huffman code. (1) I: Initialization (Initialization). A section of the input English characters statistics for each value of its right to establish a Huffman tree (2) E: encoding (Encoding). Has been built using Huffman tree for each character encoding. (3) D: Decoding (Decoding). Use has been completed for each encoding, the input of a sequence consisting of 0,1 Decoding (4) P: Printing code files (Print). Will be allocated for each character code and the Huffman decoding results are displayed in terminal.
Platform: | Size: 2048 | Author: alic | Hits:

[OtherHUFFMAN

Description: 题 目: 哈夫曼编码的程序设计 初始条件: 输入一段英文字符,试为该文中的每个字符编制相应的哈夫曼码。 (1)I:初始化(Initialization)。对输入的一段英文中的每个字符统计其权值,建立哈夫曼树; (2)E:编码(Encoding)。利用已建好的哈夫曼树,对每个字符进行编码。 (3)D:译码(Decoding)。利用已建好的每个编码,对输入的一个由0、1组成的序列进行译码; (4)P:印代码文件(Print)。将每个字符编的哈夫曼码和译码结果显示在终端上。 -Title: Huffman coding programming initial conditions: Enter the period of English characters, try the text for each character corresponding Huffman code. (1) I: Initialization (Initialization). A section of the input English characters statistics for each value of its right to establish a Huffman tree (2) E: encoding (Encoding). Has been built using Huffman tree for each character encoding. (3) D: Decoding (Decoding). Use has been completed for each encoding, the input of a sequence consisting of 0,1 Decoding (4) P: Printing code files (Print). Will be allocated for each character code and the Huffman decoding results are displayed in terminal.
Platform: | Size: 264192 | Author: 陈宗浩 | Hits:

[Data structshuffman

Description: 一份huff_tc.c,只能在tc下运行,因为加入了用tc图形界面直观画出树形的代码。一份是huff_vc.c,是在vc和tc下都能运行的程序,没有直观表达编码的树形结构。 [目的] 构建所输入符号(及权值)的哈夫曼树,并利用该树求出各符号的编码,深入理解最优二叉树的概念及其特性。 [问题描述] 读入各个符号及其权值,求各符号的哈夫曼编码。 [基本要求] (1)读入各个符号及其权值,建立哈夫曼树; (2)利用建立的哈夫曼树对各符号进行编码,输出编码结果。 [选做内容] 将所建立的哈夫曼树以直观的方式(树或凹入形式的表)显示。 -huff_tc.c, can only run at tc, because using the add tc intuitive graphical interface to draw tree code [Objective] To construct the input symbols (and the right value) of the Huffman tree, and use the tree to derive the coded symbols, in-depth understanding of the concept of optimal binary tree and its characteristics. [Problem Description] read into the various symbols and their weights, and Huffman coding of the symbols. [Basic requirements] (1) read into the various symbols and their weights, Huffman tree set up (2) the use of the Huffman tree for the set up of the symbol encoding, output encoding results. [Does the content of the election] will be set up by the Huffman tree to intuitive way (tree or indentations in the form of the table) shows.
Platform: | Size: 3072 | Author: 李霄逍 | Hits:

[Compress-Decompress algrithmshuffman_coding

Description: ) Compression using huffman code -with a number of bits k per code word -provide huffman table Huffman coding is optimal for a symbol-by-symbol coding with a known input probability distribution.This technique uses a variable-length code table for encoding a source symbol. The table is derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol .Huffman coding uses a specific method for representing each symbol, resulting in a prefix code that expresses the most common characters using shorter strings of bits than those used for less common source symbols.The Huffman coding is a procedure to generate a binary code tree. -) Compression using huffman code -with a number of bits k per code word -provide huffman table Huffman coding is optimal for a symbol-by-symbol coding with a known input probability distribution.This technique uses a variable-length code table for encoding a source symbol. The table is derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol .Huffman coding uses a specific method for representing each symbol, resulting in a prefix code that expresses the most common characters using shorter strings of bits than those used for less common source symbols.The Huffman coding is a procedure to generate a binary code tree.
Platform: | Size: 1024 | Author: ria | Hits:

[Othery

Description: 系统具备如下的功能: 1.初始化。从终端(文件)读入字符集的数据信息,。建立哈夫曼树。 2.编码:利用已建好的哈夫曼树对明文文件进行编码,并存入目标文件(哈夫曼码文件)。 3.译码:利用已建好的哈夫曼树对目标文件(哈夫曼码文件)进行编码,并存入指定的明文文件。 4.输出哈夫曼编码文件:输出每一个字符的哈夫曼编码。-The system has the following features: 1. Initialization. From the terminal (document) read the data character set information. Huffman tree establishment. 2. Coding: Using the Huffman tree has been built to express document encoding, and deposited into the target file (Huffman code files). 3. Decoding: the use of the Huffman tree has been built on the target file (Huffman code files) encoded and explicit deposit the designated file. 4. Huffman output documents: the output of each Huffman characters.
Platform: | Size: 9216 | Author: yang | Hits:

[Otheryj

Description: 系统具备如下的功能: 1.初始化。从终端(文件)读入字符集的数据信息,。建立哈夫曼树。 2.编码:利用已建好的哈夫曼树对明文文件进行编码,并存入目标文件(哈夫曼码文件)。 3.译码:利用已建好的哈夫曼树对目标文件(哈夫曼码文件)进行编码,并存入指定的明文文件。 4.输出哈夫曼编码文件:输出每一个字符的哈夫曼编码。-The system has the following features: 1. Initialization. From the terminal (document) read the data character set information. Huffman tree establishment. 2. Coding: Using the Huffman tree has been built to express document encoding, and deposited into the target file (Huffman code files). 3. Decoding: the use of the Huffman tree has been built on the target file (Huffman code files) encoded and explicit deposit the designated file. 4. Huffman output documents: the output of each Huffman characters.
Platform: | Size: 8192 | Author: yang | Hits:

[Windows Develophuffman

Description: 利用huffman编码实现小于4g文件的压缩,先用2进制读写将文件变为2进制码,再通过前缀码构造huffman树,最后存储huffman编码,解码过程反之。-Using huffman coding to achieve less than 4g file compression, first two to read and write binary file into 2 binary code, and then through the prefix code construct huffman tree, the final storage huffman encoding and decoding process of the contrary.
Platform: | Size: 52547584 | Author: 邹平 | Hits:

[DSP programcode

Description: Code for Compress the image using Huffman encoding
Platform: | Size: 291840 | Author: jai | Hits:

[Compress-Decompress algrithmsHuffman

Description: 一个完整的系统应具有以下功能: (1)初始化 从终端读入一段英文字符,统计每个字符出现的频率,建立赫夫曼树,并将该树存入某文件; (2)编码 利用建好的赫夫曼树对各字符进行编码,用列表的形式显示在屏幕上,并将编码结果存入另一文件中; (3)解码 利用保存的赫夫曼编码,对任意输入的0,1序列能正确解码; -A complete system should have the following functions: (1) initialize a read from the terminal and English characters, the frequency statistics for each character, the establishment of Huffman trees, and the tree into a document (2) encoding The Huffman tree is built using the character encoding, using the list displayed on the screen, and coding the results into another file (3) save the Huffman decoding using code, for any input 0,1 correctly decoded sequence
Platform: | Size: 616448 | Author: 木易 | Hits:

[Data structshuffman

Description: 对任意输入的一段英文,为每个字符编制其相应的赫夫曼编码;并利用该编码为任意输入的0、1序列进行解码. 基本要求:一个完整的系统应具有以下功能: (1)初始化 从终端读入一段英文字符,统计每个字符出现的频率,建立赫夫曼树,并将该树存入某文件; (2)编码 利用建好的赫夫曼树对各字符进行编码,用列表的形式显示在屏幕上,并将编码结果存入另一文件中; (3)解码 利用保存的赫夫曼编码,对任意输入的0,1序列能正确解码; -Section for any input in English, prepared for each character the corresponding Huffman code and use the encoding sequence for any input decode 0,1. Basic requirements: a complete system should have the following functions: (1) initialize a read from the terminal and English characters, the frequency statistics for each character, the establishment of Huffman tree and the tree into a document ( 2) encoding the Huffman tree is built using the character encoding, using the list displayed on the screen, and coding the results into another file (3) decoding the Huffman coding using saved on Any input can be correctly decoded sequence 0,1
Platform: | Size: 12288 | Author: 何杰 | Hits:

[Data structsHuffman

Description: 用C++实现哈夫曼码的编码和解码,代码简单,调试方便-C++ implementation using Huffman encoding and decoding, the code is simple and convenient debugging
Platform: | Size: 1140736 | Author: 桂柯易 | Hits:

[matlabhuffman-code

Description: The goal of this program is to demonstrate the construction of a huffman encoding tree. The tree is represented as a binary tree using MATLAB s built in treeplot commands. Contruction of the tree as well as the huffman code book will be described in later sections.
Platform: | Size: 25600 | Author: fefe | Hits:

[Data structsHuffman

Description: 从文件中读取数据,统计各个字符情况,用赫夫曼码实现编码和译码。-Data read from the file, the statistics of each character, using the Huffman code encoding and decoding.
Platform: | Size: 18432 | Author: mengzhen | Hits:

[Data structsHuffman100

Description: 使用Huffman编码进行文本加密(压缩)的一个示例程序。输入一段文字,自动建立Huffman树并生成各字符对应编码,并对编码前和编码后分别占用的空间进行计算-A sample program using Huffman code for text encryption (compression). Enter a text, program will automatically create Huffman tree and generate the corresponding character encoding, finally calculate the memories need before and after encoding respectively.
Platform: | Size: 2048 | Author: wzf | Hits:

[Data structsThe-Hoffman-code

Description: 利用Huffman编码方式对一段文字进行编码和解码。哈夫曼编码是可变字长编码(VLC)的一种。-Using the Huffman encoding method for encoding and decoding of a paragraph of text. Huffman code is a variable length coding (VLC) is a kind of.
Platform: | Size: 282624 | Author: 危育冰 | Hits:

[Education soft systemHuffman-coding-and-Compression--algorithm

Description: Huffman coding and Compression algorithm c++ code In computer science and information theory, a Huffman code is an optimal prefix code found using the algorithm developed by David A. Huffman while he was a Ph.D. student at MIT, and published in the 1952 paper A Method for the Construction of Minimum-Redundancy Codes .[1] The process of finding and/or using such a code is called Huffman coding and is a common technique in entropy encoding, including in lossless data compression. The algorithm s output can be viewed as a variable-length code table for encoding a source symbol (such as a character in a file). Huffman s algorithm derives this table based on the estimated probability or frequency of occurrence (weight) for each possible value of the source symbol. -Huffman coding and Compression algorithm c++ code In computer science and information theory, a Huffman code is an optimal prefix code found using the algorithm developed by David A. Huffman while he was a Ph.D. student at MIT, and published in the 1952 paper A Method for the Construction of Minimum-Redundancy Codes .[1] The process of finding and/or using such a code is called Huffman coding and is a common technique in entropy encoding, including in lossless data compression. The algorithm s output can be viewed as a variable-length code table for encoding a source symbol (such as a character in a file). Huffman s algorithm derives this table based on the estimated probability or frequency of occurrence (weight) for each possible value of the source symbol.
Platform: | Size: 2048 | Author: stoulod | Hits:

[ConsoleHuffman-Tree

Description: 使用三叉链表实现的哈夫曼树,统计inputfile1.txt中各字符的出现频率,并据此构造Huffman树,编制Huffman 码;根据已经得到的编码,对01形式的编码段进行译码。 具体的要求: 1.将给定字符文件编码,生成编码,输出每个字符出现的次数和编码; 2.将给定编码文件译码,生成字符,输出编码及其对应字符。 -Emergence of the frequency of each character in the trigeminal lists using the Huffman tree, statistics inputfile1.txt, and accordingly the Huffman tree structure, preparation of Huffman code according to the coding has been. 01 to form the code segment for decoding. Specific requirements: 1 coding the given character file, generating the encoding, and outputting the number and encoding of each character 2 will be given the encoding file decoding, generating the character, the output code and its corresponding character.
Platform: | Size: 2870272 | Author: yyy | Hits:
« 12 3 »

CodeBus www.codebus.net